﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TrueCloud.SF.DocoTool
{
    class Workflow
    {
        private string sobject;

        public string sOject
        {
            get { return sobject; }
            set { sobject = value; }
        }

        private string name;

        public string Name
        {
            get { return name; }
            set { name = value; }
        }

        private bool isactive;

        public bool isActive
        {
            get { return isactive; }
            set { isactive = value; }
        }

        private WorkflowAction[] workflowactions;

        public WorkflowAction[] WorkflowActions
        {
            get { return workflowactions; }
            set { workflowactions = value; }
        }

        private CriteriaItem[] criteriaitems;

        public CriteriaItem[] CriteriaItems
        {
            get { return criteriaitems; }
            set { criteriaitems = value; }
        }

        private string description;

        public string Description
        {
            get { return description; }
            set { description = value; }
        }

        private WorkflowTriggerType triggertype;

        public WorkflowTriggerType TriggerType
        {
            get { return triggertype; }
            set { triggertype = value; }
        }
        
        public Workflow(string name)
        {
            Name = name;   
        }
        
    }

    public class Task
    {
        public Task()
        {

        }

        private string name;

        public string Name
        {
            get { return name; }
            set { name = value; }
        }

        private bool isprotected;

        public bool IsProtected
        {
            get { return isprotected; }
            set { isprotected = value; }
        }

        private bool notifyassignee;

        public bool NotifyAssignee
        {
            get { return notifyassignee; }
            set { notifyassignee = value; }
        }

        private string assignto;

        public string assignedTo
        {
            get { return assignto; }
            set { assignto = value; }
        }


        private string description;

        public string Description
        {
            get { return description; }
            set { description = value; }
        }

        private int duedateoffset;

        public int dueDateOffset
        {
            get { return duedateoffset; }
            set { duedateoffset = value; }
        }

        private string offsetfromfield;

        public string offsetFromField
        {
            get { return offsetfromfield; }
            set { offsetfromfield = value; }
        }

        private string priority;

        public string Priority
        {
            get { return priority; }
            set { priority = value; }
        }

        private string status;

        public string Status
        {
            get { return status; }
            set { status = value; }
        }

        private string subject;

        public string Subject
        {
            get { return subject; }
            set { subject = value; }
        }


    }

    public class OutboundMessage
    {
        public OutboundMessage()
        {

        }
    }

    public class WorkflowAction
    {
        private string name;

        public string  Name
        {
            get { return name; }
            set { name = value; }
        }

        private WorkflowRuleType ruletype;

        public WorkflowRuleType ruleType
        {
            get { return ruletype; }
            set { ruletype = value; }
        }

        public WorkflowAction(string name, WorkflowRuleType ruleType)
        {
            ruleType = ruletype;
            Name = name;
        }
    }

    public class CriteriaItem
    {
        private string field;

        public string Field
        {
            get { return field; }
            set { field = value; }
        }

        private string operation;

        public string Operation
        {
            get { return operation; }
            set { operation = value; }
        }

        private string svalue;

        public string sValue
        {
            get { return svalue; }
            set { svalue = value; }
        }

        public CriteriaItem(string field, string operation, string svalue)
        {
            Field = field;
            Operation = operation;
            sValue = svalue;
        }
        
    }

}
